# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-ebooklib
_pkgname=EbookLib
pkgver=0.19
pkgrel=1
pkgdesc='Ebook library which can handle EPUB2/EPUB3 and Kindle format.'
url='https://pypi.org/project/EbookLib/#files'
arch=('any')
license=('AGPL')
depends=('python' 'python-lxml' 'python-six')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('03c4ac0391d000b83177116708b059112616b58ced06a57e4ac0363bade72172f0c9651c290a1d1b7a9cff3f8770c66b4675c7f2dbf71e84cb635df5464eb8a5')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

